<?php
/*
 * @project CreativeFramework
 * @version <#RELEASE_VERSION#>
 * @license GNU Lesser General Public License
 * @author Jimmie Lin
 */

class Logout extends CF_Controller {
	function __construct() {
		global $Lang;
		$this->title = $Lang->getFormattedKey("global.user.logout");
		$this->desc = "";
	}
	
	function Index() {
		global $Views, $Models, $DB, $Encryption, $UI, $Lang;
		if(isset($_SESSION["cf_uid"])) unset($_SESSION["cf_uid"]);
		if(isset($_SESSION["cf_acp_accessed"])) unset($_SESSION["cf_acp_accessed"]);
		$UI->message($Lang->getFormattedKey("global.user.logout.success"), "success");
		$UI->redirect("/index.php");
	}
}
